<template>
  <div style="background: #fff">
    <div class="title">
      <div>{{title}}</div>
    </div>
    <div style="padding: 1.875rem">
      <el-form :inline="true">
        <el-form-item label="">
          <el-input
            v-model="query.name"
            placeholder="运营账户账号"
          ></el-input>
        </el-form-item>
     
        
        <el-form-item>
          <el-button type="success" @click="getData(true)">查询</el-button>
          <el-button @click="reset">重置</el-button>
          <el-button type="danger" @click="reset">支出工资</el-button>
          <el-button type="info" @click="reset">账户充值</el-button>
          <!-- <el-button type="primary" @click="showEdit(-1)">添加</el-button> -->
        </el-form-item>
      </el-form>
    </div>
    <el-table :data="data" stripe style="width: 100%; margin-bottom: 1.875rem">
      <el-table-column prop="id" label="id"></el-table-column>
      <el-table-column prop="name" label="登录账号"></el-table-column>
    
                 <el-table-column label="业务经理">
        <template slot-scope="scope">
         {{scope.row.parent.real_name}}
        </template>
      </el-table-column>
           <el-table-column label="补贴计划">
        <template slot-scope="scope">
         {{['A','B','C'][scope.row.plan_id-1]}}
        </template>
      </el-table-column>
       <el-table-column prop="real_name" label="负责人姓名"></el-table-column>
     
     
      <el-table-column prop="created_at" label="加入时间"></el-table-column>
      <!-- <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button size="small" @click="showEdit(scope.row.id)">查看详情</el-button>
         
        </template>
      </el-table-column> -->
    </el-table>
    <el-pagination
      background
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="pages.currentPage"
     
      :page-size="pages.per_page"
      layout="total,prev, pager, next"
      :total="pages.total"
      style="text-align: center"
    >
    </el-pagination>
   
    <!-- <el-dialog title="编辑" :visible.sync="editModal" width="30%">
        <el-form :model="item">
          <el-form-item label="登陆账号">
            <el-input v-model="item.name" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="密码">
            <el-input v-model="item.pwd" autocomplete="off"></el-input>
          </el-form-item>
           <el-form-item label="单位">
            <el-input v-model="item.company" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="手机号">
            <el-input v-model="item.phone" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="负责人">
            <el-input v-model="item.real_name" autocomplete="off"></el-input>
          </el-form-item>
          
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="editModal = false">取 消</el-button>
          <el-button type="primary" @click="edit">确 定</el-button>
        </div>
      </el-dialog> -->
    
  </div>
</template>

<script>
import mixin from "../../js/mixin";

export default {
  name: "homePage",
  mixins: [mixin],
  data() {
    return {
      is_check:false,
      is_page: true,
      api_url: "account",
      
     
      item: {},
      query: {
        type:5,
        name: "",
      },
    };
  },
  components: {},
  mounted() {
  
  },
  created() {
    this.title = this.$route.meta.title
    this.init()
    
  },
  methods: {
    reset() {
      this.query = {
        city_id:'',
       
        name: ''
      },
      this.getData(true)
    },
    init(){
      // this.getCate()
      this.getData()
      this.getCity()
    },
    

   

    // getDocument() {
    //   this.global
    //     .httpRequest("document", { user_id: this.item.id })
    //     .then((res) => {
    //       this.document = res;
    //     });
    // },
   
  },
};
</script>

<style scoped>



.contents {
  padding: 1.875rem;
  display: flex;
  flex-wrap: wrap;
}

.dateTitle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}
.dateInfo {
  width: 18.5%;
  text-align: center;
  background: #fff;
  color: #6f737a;
  line-height: 3.75rem;
  cursor: pointer;
}
.saleDate {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.625rem;
}
.saleDate > div {
  width: 48.5%;
  padding: 2.5rem 0;
  background: #fff;
}
.saleDate > div > span {
  display: block;
  margin-left: 1.875rem;
  color: #6f737a;
  margin-bottom: 1.5rem;
}
.saleDate > div > div {
  margin-left: 1.875rem;
  color: #333;
  font-size: 1.5rem;
}

.goodsInfo {
  width: 13.5rem;
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
}
.goodsInfo > div {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.revenueInfo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.revenueInfo > span {
  color: #6f737a;
  margin-bottom: 1.5rem;
}
.revenueInfo > div {
  color: #333;
  font-size: 2rem;
}
.text {
  font-size: 14px;
}

.item {
  padding: 18px 0;
}

.titleInfo{
  display: flex;
  align-items: center;
  margin: 2rem 5rem;
  margin-left: 2rem;
}
</style>
